package y23.Jun;

import java.util.Scanner;

//输出两个正整数的最大公约数
public class Test5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int x = sc.nextInt();
            int y = sc.nextInt();
            for(int i = 1;i <= Math.min(x,y);i++){
                if(x % i == 0&&y % i == 0&&i != 1){
                    System.out.println();
                    break;
                }
            }
        }
    }
}
